QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Creating and Accessing Macintosh Storage Objects

QuickDraw 3D provides routines for creating and managing Macintosh storage objects.

Q3MacintoshStorage_New

You can use the Q3MacintoshStorage_New function to create a new Macintosh storage object.

TQ3StorageObject Q3MacintoshStorage_New (short fsRefNum);
fsRefNum
A file reference number of the data fork of a Macintosh file. This file must already be open.

DESCRIPTION

The Q3MacintoshStorage_New function returns, as its function result, a new storage object associated with the Macintosh file specified by the fsRefNum parameter. The specified file is assumed to be open, and it must remain open as long as you use the returned storage object. In addition, you are responsible for closing the file once the associated storage object has been closed or disposed of. If Q3MacintoshStorage_New cannot create a new storage object, it returns the value NULL .

ERRORS

kQ3ErrorOutOfMemory

Q3MacintoshStorage_Get

You can use the Q3MacintoshStorage_Get function to get information about a Macintosh storage object.

TQ3Status Q3MacintoshStorage_Get (
                     TQ3StorageObject storage,
                     short *fsRefNum);
storage
A Macintosh storage object.
fsRefNum
On exit, the file reference number of the Macintosh file associated with the specified storage object.

DESCRIPTION

The Q3MacintoshStorage_Get function returns, in the fsRefNum parameter, the file reference number of the Macintosh file associated with the Macintosh storage object specified by the storage parameter.

Q3MacintoshStorage_Set

You can use the Q3MacintoshStorage_Set function to set information about a Macintosh storage object.

TQ3Status Q3MacintoshStorage_Set (
                     TQ3StorageObject storage,
                     short fsRefNum);
storage
A Macintosh storage object.
fsRefNum
A file reference number.

DESCRIPTION

The Q3MacintoshStorage_Set function sets the file reference number of the file associated with the Macintosh storage object specified by the storage parameter to the number specified by the fsRefNum parameter.

SPECIAL CONSIDERATIONS

You must not use Q3MacintoshStorage_Set with an open Macintosh storage object.

ERRORS

kQ3ErrorStorageIsOpen

Q3MacintoshStorage_GetType

You can use the Q3MacintoshStorage_GetType function to get the type of a Macintosh storage object.

TQ3ObjectType Q3MacintoshStorage_GetType (TQ3StorageObject storage);
storage
A Macintosh storage object.

DESCRIPTION

The Q3MacintoshStorage_GetType function returns, as its function result, the type of the Macintosh storage object specified by the storage parameter. The types of Macintosh storage objects currently supported by QuickDraw 3D are defined by this constant:

kQ3MacintoshStorageTypeFSSpec

If the specified memory storage object is invalid or is not of this type, Q3MacintoshStorage_GetType returns the value kQ3ObjectTypeInvalid .

ERRORS

kQ3ErrorNoSubclass kQ3ErrorInvalidObjectParameter kQ3ErrorNULLParameter


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |